PRO MASK
C=[0,1,-1,-1,1,-1,1,1,-1,1,1,1,-1,1,-1,$
   1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,-1,1,$
   1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,-1,1,$
   1,1,-1,1,1,-1,1,-1,-1,1]
A=INTARR(53,53)
A=(C#C+1)/2
A[*,0]=0
A[0,1:52]=1

M=INTARR(95,95)
M[0:47,0:47]=ROTATE(A[0:47,0:47],2)
M[48:94,0:47]=ROTATE(A[1:47,0:47],7)
M[0:47,48:94]=ROTATE(A[0:47,1:47],5)
M[48:94,48:94]=A[1:47,1:47]

mypattern=OBJ_NEW('IDLgrPattern',STYLE=0)
myview=OBJ_NEW('IDLgrView',VIEWPLANE_RECT=[0,0,95,95])
mymodel=OBJ_NEW('IDLgrModel')
myview->Add,mymodel

FOR i=0,94 DO BEGIN
 FOR j=0,94 DO BEGIN
  IF M[j,i] EQ 0 THEN BEGIN
    MyPolygon=OBJ_NEW('IDLgrPolygon',[[j,i],[j+1,i],[j+1,i+1],[j,i+1]],$
               FILL_PATTERN=mypattern)
    mymodel->Add,MyPolygon
  ENDIF 
 ENDFOR
ENDFOR

mywindow=OBJ_NEW('IDlgrWindow',RETAIN=2)
mywindow->Draw,myview

END
